<?php
$siteConf = n_api('site')->getSiteConfig();
?>
<!DOCTYPE HTML>
<html>
	<head>
		<title><?=$siteConf['site_name']?>-<?=$siteConf['site_second_name']?></title>

		<link rel="stylesheet" type="text/css" href="<?=n_css('skin','reset')?>" />
		<link rel="stylesheet" type="text/css" href="<?=n_css('skin','layout')?>" />
		<link rel="stylesheet" type="text/css" href="<?=n_css('skin','trfeature')?>" />
		<script src="<?=n_js('skin','jquery-2.0.3.min')?>"></script>
		<script src="<?=n_js('skin','jquery.cookie')?>"></script>
		<script src="<?=n_js('skin','jquery.lazyload.min')?>"></script>
		
		<!--script src="<?=n_js('skin','tools')?>"></script-->
		<!--script src="<?=n_js('skin','ui')?>"></script-->
		<script src="<?=n_js('skin','reui')?>"></script>
		<script>
			$(document).ready(function(){
				
				$("#header .logo").click(function(){
					location.href="/";
				});
			});
		</script>
	</head>
	
	<body>
		<div id="header" class="n-block-bg">
			<div id="nav" class="n-max-width n-middle">
				
				<div class="main-nav">
					<a<?=((N_ACTION=='rankdaily')&&(N_EVENT=='mprank'))?' class="current"':''?> href="<?=n_url('mprank', 'rankDaily')?>">中自榜榜单</a> 
					 
					<a<?=(N_EVENT=='article')?' class="current"':''?> href="<?=n_url('article', 'articlesDaily')?>">热门文章</a>
					<a<?=(N_EVENT=='weixin')?' class="current"':''?> href="<?=n_url('weixin', 'compete')?>">公号对比</a>
					<a<?=((N_EVENT=='index')&&(N_ACTION=='myad'))?' class="current"':''?> href="<?=n_url('index', 'myad')?>">广告投放</a>
					
					<a<?=((N_EVENT=='index')&&(N_ACTION=='cooperate'))?' class="current"':''?> href="<?=n_url('index', 'cooperate')?>">关于我们</a>
					<?php if (n_api('passport')->isLogin()){?>
						<dl>
							<dt>
								<a onclick="$(this).parents('dl').find('dd').toggle();"><?=$_SESSION['nickname']?>
									<img src="/skin/img/top-toggle.png" />
								</a>
								
								</dt>
							<dd>
								<?=n_href(n_url('cart','mycart'),"我的收藏"," target='_blank'")?>
								<div style="height:1px;line-height:1px;"></div>
								<?=n_href(n_url('passport','dologout'),"退出","class='btn'")?>
							</dd>
						</dl>
						
					<?php 
					}else{
					?>
						<?=n_href(n_url('passport','login'),"登录","class='btn'")?>
						<!--<?=n_href(n_url('passport','reg'),"注册","class='btn'")?>-->
						
					<?php
					}
					?>
				</div>
				<div class="logo">
					<img src="/index/img/logo-2.png" />
				</div>
			</div>
		</div>
		<div id="body">